                    <?php
                        function de_format($content) {
                            return extract_repost_content(htmlspecialchars_decode($content));
                        }
                    
                        function trunc($str, $num = 32) {
                            if (mb_strlen($str) > $num) {
                                $str = mb_substr($str, 0, $num) . '...';
                            }
                            return $str;
                        }
                        
                        function msg_link($post_link) {
                            return 'msg/read/' . str_replace('#', '/h/', $post_link);
                        }
                    ?>
                    <div>
                    <?php
                        if (isset($msgs)) {
                            foreach($msgs as $msg) {
                                $msg['self'] = $self;
                                $this->load->view('msg/msg_single', $msg);
                            }
                        } else {
                            echo '暂无新消息！';
                        }
                    ?>
                    </div>
